<?php
namespace Auth;
 
return array(
     
    //controllers services...
    'controllers' => array(
        'factories' => array(
            'Auth\Controller\Auth' =>
               'Auth\Factory\Controller\AuthControllerServiceFactory' 
        ),
        'invokables' => array(
            'Auth\Controller\Success' =>
               'Auth\Controller\SuccessController'  
        ),
    ),
     
    //register auth services...
    'service_manager' => array(
        'factories' => array(
            'AuthStorage' =>
               'Auth\Factory\Storage\AuthStorageFactory',
            'AuthService' => 
               'Auth\Factory\Storage\AuthenticationServiceFactory',
        ),
    ),
     
    //routing configuration...    
    'router' => array(
        'routes' => array(
             
            'auth' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/auth[/:action][/:id]',
                    'defaults' => array(
                        'controller' => 'Auth\Controller\Auth',
                        'action'     => 'index',
                    ),
                ),
            ),
             
            'success' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/success[/:action]',
                    'defaults' => array(
                        'controller' => 'Auth\Controller\Success',
                        'action'     => 'index',
                    ),
                ),
            ),
        ),
    ),
     
    //setting up view_manager
    'view_manager' => array(
        'template_path_stack' => array(
            'Auth' => __DIR__ . '/../view',
        ),
    ),
	'module_layouts' => array(
      'Auth' => array(
          'default' => 'layout/login',
          
        )
     ),
	
);